package com.example.demo.cotroller;



import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {
    public static Logger logger= LoggerFactory.getLogger(UserController.class);

    @RequestMapping("/sayhi")
    @ResponseBody//返回一个非静态页面的数据
    public String sayHi(String name){
        logger.trace("我是trace");
        logger.debug("我是debug");
        logger.info("我是info");
        logger.warn("我是warn");
        logger.error("我是error");

        return "Hi,"+name;
    }
}